package myjiava6.com;

import java.util.Calendar;
import java.util.Date;

public class Datel
{
	public static void main(String[] args)
	{
		System.out.println("==时间==");
		Date dt =new Date();
		/*重写了  显示的是外国版当前的时间*/
		System.out.println("=toString="+dt);
		/*显示的是中国版当前的时间*/
		System.out.println(dt.toLocaleString());
		
		/*返回的是自1970年一月一日之后的时间*/
		System.out.println(dt.getTime());
		/*_______________________*/
		System.out.println("=="+Calendar.ALL_STYLES);
		System.out.println("=="+Calendar.getInstance());
		Calendar ri = Calendar.getInstance();
		System.out.println(ri.toString());
		long s=System.currentTimeMillis();
		System.out.println("=="+s);
		System.out.println(ri.ERA);
		System.out.println("=="+ri.AM_PM);
		System.out.println("=="+ri.AM);
		System.out.println("=="+ri.ALL_STYLES);
		System.out.println("=="+ri.PM);
		System.out.println("=="+ri.ZONE_OFFSET);
		Date d=ri.getTime();
		System.out.println(d.toLocaleString());
		ri.setTime(d);
		System.out.println(ri);
		
	}
}
